﻿using System.Net;
using System.Net.Sockets;
using Comunication;


namespace ComunicationServer
{
    class TCPAcceptManager:IAccepManager
    {
        public int AccepReceived(Socket handler, out ITcpPacketProcessor newTcpUtils)
        {
            Logger.Log(string.Format("TCP Connection Accepted IP: {0} Port{1}", ((IPEndPoint)handler.RemoteEndPoint).Address, ((IPEndPoint)handler.RemoteEndPoint).Port));
            newTcpUtils = new TCPPacketProcessor();
            return Properties.Settings.Default.TCPBytesToRead;
        }
    }
}
